class IDocument:
    def __init__(self):
        self.aView = []

    def AddObserver(self, view):
        self.aView.append(view)

    def NotifyObservers(self):
        for obs in self.aView:
            obs.Update(self)

    def Flush(self):
        self.NotifyObservers()
